/***********************************************************************************************************************
**	filename: user_types.h
**	author: Echo Zhang @2021-04-30
**  e-mail: not_xx@126.com
***********************************************************************************************************************/

#ifndef USER_TYPES_INCLUDED
#define USER_TYPES_INCLUDED

#include <stdint.h>
#include <stdbool.h>

typedef int8_t									si8;
typedef uint8_t									ui8;
typedef int16_t									si16;
typedef uint16_t								ui16;
typedef int32_t									si32;
typedef uint32_t								ui32;
typedef int64_t									si64;
typedef uint64_t								ui64;

typedef float									fp32;
typedef double									fp64;

typedef ui16 									Size_DT;

typedef si32 (*FuncWithoutArgs_FT)(void);
typedef si32 (*FuncWithOneArgs_FT)(void *arg);
typedef si32 (*FuncWithTowArgs_FT)(void *arg1, void *arg2);
typedef si32 (*FuncWithThreeArgs_FT)(void *arg1, void *arg2, void *arg3);
typedef si32 (*GetFunc_FT)(void *handle, si32 timeout);
typedef si32 (*PutFunc_FT)(void *handle, ui8 ch);
typedef si32 (*RecvFunc_FT)(void *handle, ui8 buffer[], si32 bufferLen, si32 timeout);
typedef si32 (*SendFunc_FT)(void *handle, const ui8 buffer[], si32 bufferLen);
typedef si32 (*CompareFunc_FT)(void *data1, void *data2, void *args);

#if !defined(NO_ERROR)
#define NO_ERROR								((si32)0)
#endif

#if !defined(NULL)
#define NULL									((void *)0)
#endif

// use printf func
#define USING_PRINTF

// use std printf func
#define USING_STD_PRINTF

// enable debug mode
//~ #define DBG_MODE

// enbale assert
#define USING_ASSERT

// enbale output check msg
#define USING_CHECK_MSG


#endif	/* USER_TYPES_INCLUDED */

/***********************************************************************************************************************
**	endline
***********************************************************************************************************************/
